import React, { Component } from 'react';
import { hashHistory } from 'react-router';
import Head from 'views/component/head/head';
import userData from 'js/core/userData';
import { SubViewLink } from 'views/component/subViewLink/subViewLink';
import './find.scss';
import { i18n } from 'js/core/i18n';
class Find extends Component {
	render() {
		return (
			<div id="find" className="flex-col">
				<Head head={i18n.get("发现")} isShow={false} />
				<div className="flex-g-1 scroll-absolute">
					<div>
						{(userData.hasPower(301) || userData.hasPower(302) || userData.hasPower(303) || userData.hasPower(304) || userData.hasPower(305)
							|| userData.hasPower(306) || userData.hasPower(3)) &&
							<div className="box">
								<div className="title">{i18n.get("客流数据")}</div>
								<div className="flex wrap">
									{userData.hasPower(301) && <SubViewLink className="item flex-col-3" moduleName="totalFlow" title={i18n.get("总客流分析")}>
										<div className="flex-center">	<div className="icon find_desktop"></div></div>
										<div className="name">{i18n.get("总客流分析")}</div>
									</SubViewLink>}
									{userData.hasPower(302) && <SubViewLink className="item flex-col-3" moduleName="brandFlow" title={i18n.get("品牌客流分析")}>
										<div className="flex-center">	<div className="icon find_diamond"></div></div>
										<div className="name">{i18n.get("品牌客流分析")}</div>
									</SubViewLink>}
									{userData.hasPower(303) && <SubViewLink className="item flex-col-3" moduleName="regionFlow" title={i18n.get("区域客流分析")}>
										<div className="flex-center">	<div className="icon find_globe"></div></div>
										<div className="name">{i18n.get("区域客流分析")}</div>
									</SubViewLink>}
									{userData.hasPower(304) && <SubViewLink className="item flex-col-3" moduleName="zoneFlow" title={i18n.get("地区客流分析")}>
										<div className="flex-center">	<div className="icon find_pin"></div></div>
										<div className="name">{i18n.get("地区客流分析")}</div>
									</SubViewLink>}
									{userData.hasPower(305) && <SubViewLink className="item flex-col-3" moduleName="singleStoreFlow" title={i18n.get("单店客流分析")}>
										<div className="flex-center">	<div className="icon find_home"></div></div>
										<div className="name">{i18n.get("单店客流分析")}</div>
									</SubViewLink>}
									{userData.hasPower(306) && <SubViewLink className="item flex-col-3" moduleName="multiStoreFlow" title={i18n.get("店铺客流对比")} >
										<div className="flex-center">	<div className="icon find_flag"></div></div>
										<div className="name">{i18n.get("店铺客流对比")}</div>
									</SubViewLink>}
									{userData.hasPower(3) && <SubViewLink className="item flex-col-3" moduleName="flowFace" title={i18n.get("顾客分析")} >
										<div className="flex-center">	<div className="icon find_user"></div></div>
										<div className="name">{i18n.get("顾客分析")}</div>
									</SubViewLink>}
								</div>
							</div>}
						{(userData.hasPower(401) || userData.hasPower(403) || userData.hasPower(404)) &&
							<div className="box">
								<div className="title">{i18n.get("店铺可视化")}</div>
								<div className="flex wrap">
									{userData.hasPower(401) && <SubViewLink moduleName="monitoringByShiti" title={i18n.get("实时监控")} className="item flex-col-3">
										<div className="flex-center">	<div className="icon icon_jiankong">	</div></div>
										<div className="name">{i18n.get("实时监控")}</div>
									</SubViewLink>}
									{userData.hasPower(403) && <SubViewLink className="item flex-col-3" moduleName="handleListSummary" title={i18n.get("巡店记录汇总")}>
										<div className="flex-center">	<div className="icon find_store">
										</div></div>
										<div className="name">{i18n.get("巡店记录")}</div>
									</SubViewLink>}

									{/* <SubViewLink moduleName="monitoringMatch" title={i18n.get("远程回放")} className="item flex-col-3">
									<div className="flex-center">	<div className="icon find_play"></div></div>
									<div className="name">{i18n.get("远程回放")}</div>
								</SubViewLink> */}

									{/* <SubViewLink className="item flex-col-3" moduleName="handleList" title={i18n.get("自动巡店")}>
									<div className="flex-center">	<div className="icon find_sensor"></div></div>
									<div className="name">{i18n.get("自动巡店")}</div>
								</SubViewLink> */}

									{userData.hasPower(404) && <SubViewLink className="item flex-col-3" moduleName="storeAnalysis" title={i18n.get("巡店报告")}>
										<div className="flex-center">	<div className="icon find_statics">	</div></div>
										<div className="name">{i18n.get("巡店报告")}</div>
									</SubViewLink>}

									{/* <SubViewLink className="item flex-col-3" moduleName="storeRecord" title={i18n.get("巡店记录")}>
									<div className="flex-center">	<div className="icon find_store">
									</div></div>
									<div className="name">{i18n.get("巡店记录")}</div>
								</SubViewLink>



								<SubViewLink moduleName="imgRecord" title={i18n.get("图片记录")} className="item flex-col-3" >
									<div className="flex-center">	<div className="icon find_img">
									</div></div>
									<div className="name">{i18n.get("图片记录")}</div>
								</SubViewLink> */}
								</div>
							</div>
						}
						<div className="flex">
							{userData.hasPower(5) && <div className="box1 box1-left">
								<div className="title">{i18n.get("防盗防损")}</div>
								<div className="flex wrap boxItem">
									<SubViewLink moduleName="eas" title={i18n.get("防盗防损")} className="item">
										<div className="flex-center">	<div className="icon find_camera2">
										</div></div>
										<div className="name">{i18n.get("防盗防损")}</div>
									</SubViewLink>
								</div>
							</div>}
							{userData.hasPower(601) && <div className="box1">
								<div className="title">{i18n.get("设备状态")}</div>
								<div className="flex wrap boxItem">
									<SubViewLink moduleName="deviceMgr" title={i18n.get("设备状态")} className="item">
										<div className="flex-center"><div className="icon find_device"></div></div>
										<div className="name">{i18n.get("设备状态")}</div>
									</SubViewLink>
								</div>
							</div>}
						</div>
					</div>
				</div>
			</div>
		);
	}
}

export default Find;
